<?php

class Props
{
	private static $props;


	public static function get($group, $prop = '') {

		if (!isset($props)) {
			$idx = strpos(__DIR__, "CentralOffice");
			$pfile = substr(__DIR__, 0, $idx) . "site.ini";
			$props = parse_ini_file($pfile, true);
		}

		if (!isset($props[$group])) {
			return NULL;
		}
		$gprops = $props[$group];
		if ($prop == '') {
			return $gprops;
		}

		return $gprops[$prop];
	}
}

?>